import java.util.Scanner;

public class test45 {
    //键盘录入一个字符串,统计该字符串中大写字母字符,小写字母字符,数字字符出现的次数
    public static void main(String[] args) {
        //1.键盘录入一个字符串
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s = sc.next();
        //统计,使用计数器思想
        //定义三个计数器
        int big = 0;
        int small = 0;
        int number = 0;
        for (int i = 0; i < s.length(); i++) {
            //i表示字符串中每一个索引
            char c = s.charAt(i);
            if (c >= '0' && c <= '9') {
                number++;
            }else if (c >= 'A' && c <= 'Z') {
                big++;
            }
            else if(c >= 'a' && c <= 'z') {
                small++;
            }
            System.out.println("大写字母有"+big+"个");
            System.out.println("小写字母有"+small+"个");
            System.out.println("数字有"+number+"个");
        }

    }
}
